const { createProxyMiddleware } = require('http-proxy-middleware'); //引入这个中间件
module.exports = function(app){
    app.use(
        '/api',
         createProxyMiddleware(
            { target: 'http://127.0.0.1:5656',
             changeOrigin: true,
             pathRewrite:{
                '^/api':''
             }
             }
            ));

 
}